package com.practice.designMode.coupon;

public enum CouponType {
    FULL(1),
    DISCOUNT(2);

    private Integer type;

    CouponType(Integer type) {
        this.type = type;
    }

    public Integer getType() {
        return type;
    }

    public static CouponType typeOf(Integer type){
        for(CouponType value : values()){
            if(value.getType().equals(type)){
                return value;
            }
        }
        return null;
    }
}
